/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: jse2302 - T4
 * <p>Powered by webrx On 2023-06-29 17:38:31
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class T4 {
    public static void main(String[] args) {
        var t = new Thread(T4::work,"work");
        t.start();
        System.out.println("ok");
        while(true){
            try{
                Thread.sleep(5000);
                System.out.printf("%tF %<tT%n",System.currentTimeMillis());
            }catch(Exception e){
                e.printStackTrace();
            }
        }
    }

    static void work(){
        while(true){
            try{
                Thread.sleep(5000);
                System.out.printf("%tF %<tT%n",System.currentTimeMillis());
            }catch(Exception e){
                e.printStackTrace();
            }
        }
    }
}
